package com.kexio.enterprise.integration.notification.statistics;

import com.kexio.enterprise.integration.notification.enums.NotificationChannel;
import com.kexio.enterprise.integration.notification.enums.NotificationType;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 通知统计信息
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class NotificationStatistics {
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private long totalNotifications;
    private long sentNotifications;
    private long deliveredNotifications;
    private long readNotifications;
    private long failedNotifications;
    private long expiredNotifications;
    private double deliveryRate;
    private double readRate;
    private double failureRate;
    private long averageDeliveryTime;
    private long averageReadTime;
    private Map<NotificationType, Long> typeStats; // 按类型统计
    private Map<NotificationChannel, Long> channelStats; // 按渠道统计
    private Map<String, Long> hourlyStats; // 按小时统计
    private Map<String, Long> userEngagementStats; // 用户参与度统计

    // Getters and Setters
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public long getTotalNotifications() { return totalNotifications; }
    public void setTotalNotifications(long totalNotifications) { this.totalNotifications = totalNotifications; }
    
    public long getSentNotifications() { return sentNotifications; }
    public void setSentNotifications(long sentNotifications) { this.sentNotifications = sentNotifications; }
    
    public long getDeliveredNotifications() { return deliveredNotifications; }
    public void setDeliveredNotifications(long deliveredNotifications) { this.deliveredNotifications = deliveredNotifications; }
    
    public long getReadNotifications() { return readNotifications; }
    public void setReadNotifications(long readNotifications) { this.readNotifications = readNotifications; }
    
    public long getFailedNotifications() { return failedNotifications; }
    public void setFailedNotifications(long failedNotifications) { this.failedNotifications = failedNotifications; }
    
    public long getExpiredNotifications() { return expiredNotifications; }
    public void setExpiredNotifications(long expiredNotifications) { this.expiredNotifications = expiredNotifications; }
    
    public double getDeliveryRate() { return deliveryRate; }
    public void setDeliveryRate(double deliveryRate) { this.deliveryRate = deliveryRate; }
    
    public double getReadRate() { return readRate; }
    public void setReadRate(double readRate) { this.readRate = readRate; }
    
    public double getFailureRate() { return failureRate; }
    public void setFailureRate(double failureRate) { this.failureRate = failureRate; }
    
    public long getAverageDeliveryTime() { return averageDeliveryTime; }
    public void setAverageDeliveryTime(long averageDeliveryTime) { this.averageDeliveryTime = averageDeliveryTime; }
    
    public long getAverageReadTime() { return averageReadTime; }
    public void setAverageReadTime(long averageReadTime) { this.averageReadTime = averageReadTime; }
    
    public Map<NotificationType, Long> getTypeStats() { return typeStats; }
    public void setTypeStats(Map<NotificationType, Long> typeStats) { this.typeStats = typeStats; }
    
    public Map<NotificationChannel, Long> getChannelStats() { return channelStats; }
    public void setChannelStats(Map<NotificationChannel, Long> channelStats) { this.channelStats = channelStats; }
    
    public Map<String, Long> getHourlyStats() { return hourlyStats; }
    public void setHourlyStats(Map<String, Long> hourlyStats) { this.hourlyStats = hourlyStats; }
    
    public Map<String, Long> getUserEngagementStats() { return userEngagementStats; }
    public void setUserEngagementStats(Map<String, Long> userEngagementStats) { this.userEngagementStats = userEngagementStats; }
}
